  /* forum.css - 论坛页面样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4a6bff;
    --secondary-color: #6c87ff;
    --accent-color: #ff6b6b;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #888888;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --gradient: linear-gradient(135deg, #4a6bff 0%, #6c87ff 100%);
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 90px;
    padding: 30px;
    transition: margin-left 0.3s;
}

/* 论坛内容区域 */
.forum-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* 帖子列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    display: flex;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.post-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.post-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 20px;
    min-width: 50px;
}

.vote-count {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.vote-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s;
}

.vote-btn:hover {
    color: var(--primary-color);
}

.post-content {
    flex: 1;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 14px;
}

.post-tags {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    padding: 5px 12px;
    background: rgba(74, 107, 255, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* 热门话题 */
.topic-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.topic-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.2s;
}

.topic-item:hover {
    background: rgba(74, 107, 255, 0.05);
}

.topic-icon {
    width: 40px;
    height: 40px;
    background: rgba(74, 107, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
}

.topic-name {
    flex: 1;
    font-weight: 500;
}

.topic-count {
    background: var(--gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 用户卡片 */
.user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    margin-bottom: 15px;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-title {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.user-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

/* 用户导航信息样式 */
.user-info-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text {
    color: var(--text-primary);
    font-weight: 500;
    margin-right: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-logout {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.auth-buttons-guest {
    display: flex;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .forum-container {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-column {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .auth-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-votes {
        flex-direction: row;
        justify-content: flex-start;
        padding-right: 0;
        padding-bottom: 15px;
        min-width: auto;
    }
    
    .vote-count {
        margin: 0 15px;
    }
    
    .user-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
}